<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>湖南河道违法管理后台</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="https://www.layuicdn.com/layui/css/layui.css"  media="all">
    <link rel="stylesheet" href="../css/globalStyle.css"  media="all">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo" style="color: white;font-family: '华文行楷';font-size: 22px;">河道违法管理平台</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item user-nav"><a style="font-size:18px;" href="javascript:;">违法管理</a></li>
            <li class="layui-nav-item user-nav"><a style="font-size:18px;" href="javascript:;">系统管理</a></li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img th:src="${session.user.avatar}" class="layui-nav-img">
                    <span th:text="${session.user.nickname}">贤心</span>
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="javascript:;">退出</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll user-subnav">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;"><i class="layui-icon layui-icon-component"></i> 违法管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;"><i class="layui-icon layui-icon-list"></i> 违法记录</a></dd>
                        <dd><a href="javascript:;"><i class="layui-icon layui-icon-list"></i> 执法记录</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon layui-icon-component"></i> 河道管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;"><i class="layui-icon layui-icon-list"></i> 河道列表</a></dd>
                    </dl>
                </li>
            </ul>
            <ul class="layui-nav layui-nav-tree" style="display:none;"  lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;"><i class="layui-icon layui-icon-component"></i> 系统管理</a>
                    <dl class="layui-nav-child">
                        <dd><a path="/user/list" href="javascript:;"><i class="layui-icon layui-icon-list"></i> 系统用户管理</a></dd>
                        <dd><a href="javascript:;"><i class="layui-icon layui-icon-list"></i> 系统角色管理</a></dd>
                        <dd><a href="javascript:;"><i class="layui-icon layui-icon-list"></i> 系统参数设置</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon layui-icon-component"></i> 基础资料管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;"><i class="layui-icon layui-icon-list"></i> 地区管理</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>
    <div class="layui-body" style="bottom:0;">
        <!-- 内容主体区域 -->
    </div>
</div>
<script src="https://www.layuicdn.com/layui/layui.js" charset="utf-8"></script>
<script src="../js/globalFunction.js" charset="utf-8"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

        //切换二级菜单
        $(".user-nav").click(function () {
            var index=$(".user-nav").index(this);
            $(".user-subnav ul").hide();
            $(".user-subnav").find("ul").eq(index).show();
        });

        $(".layui-nav-child a").click(function () {
            var url = $(this).attr("path");
            reqRawHtml(url);
        });

        //发送异步请求，获取dashboard页面的内容
        reqRawHtml("/user/dashboard");
    });
</script>
</body>
</html>
